package com.jbm.jsm.iface;

import com.jbm.core.iface.IAcross;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by Administrator on 2017/9/26.
 */
@Entity
@Table(name = "arbitrate_log", schema = "", catalog = "jsm")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class ArbitrateLogEntity extends IAcross
{
    private int alId;
    private Integer aId;
    private Timestamp createDate;
    private Integer createId;
    private Integer result;
    private Integer auditResult;
    private Integer auditId;
    private Timestamp auditDate;
    private UserEntity createUser;
    private UserEntity auditUser;
    private String createType;
    private ArbitrateInfoEntity arbitrateInfoEntity;

    public ArbitrateLogEntity()
    {
        super();
    }

    public ArbitrateLogEntity(IAcross ia)
    {
        super(ia);
    }

    @Id
    @Column(name = "al_id")
    @GeneratedValue
    public int getAlId() {
        return alId;
    }

    public void setAlId(int alId) {
        this.alId = alId;
    }

    @Basic
    @Column(name = "a_id")
    public Integer getaId() {
        return aId;
    }

    public void setaId(Integer aId) {
        this.aId = aId;
    }

    @Basic
    @Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "create_id")
    public Integer getCreateId() {
        return createId;
    }

    public void setCreateId(Integer createId) {
        this.createId = createId;
    }

    @Basic
    @Column(name = "result")
    public Integer getResult() {
        return result;
    }

    public void setResult(Integer result) {
        this.result = result;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ArbitrateLogEntity that = (ArbitrateLogEntity) o;

        if (alId != that.alId) return false;
        if (aId != null ? !aId.equals(that.aId) : that.aId != null) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (createId != null ? !createId.equals(that.createId) : that.createId != null) return false;
        if (result != null ? !result.equals(that.result) : that.result != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result1 = alId;
        result1 = 31 * result1 + (aId != null ? aId.hashCode() : 0);
        result1 = 31 * result1 + (createDate != null ? createDate.hashCode() : 0);
        result1 = 31 * result1 + (createId != null ? createId.hashCode() : 0);
        result1 = 31 * result1 + (result != null ? result.hashCode() : 0);
        return result1;
    }

    @Basic
    @Column(name = "audit_result")
    public Integer getAuditResult() {
        return auditResult;
    }

    public void setAuditResult(Integer auditResult) {
        this.auditResult = auditResult;
    }

    @Basic
    @Column(name = "audit_id")
    public Integer getAuditId() {
        return auditId;
    }

    public void setAuditId(Integer auditId) {
        this.auditId = auditId;
    }

    @Basic
    @Column(name = "audit_date")
    public Timestamp getAuditDate() {
        return auditDate;
    }

    public void setAuditDate(Timestamp auditDate) {
        this.auditDate = auditDate;
    }
@Transient
    public UserEntity getCreateUser() {
        return createUser;
    }

    public void setCreateUser(UserEntity createUser) {
        this.createUser = createUser;
    }

    @Transient
    public UserEntity getAuditUser() {
        return auditUser;
    }

    public void setAuditUser(UserEntity auditUser) {
        this.auditUser = auditUser;
    }

    @Basic
    @Column(name = "create_type")
    public String getCreateType() {
        return createType;
    }

    public void setCreateType(String createType) {
        this.createType = createType;
    }
@Transient
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
    public ArbitrateInfoEntity getArbitrateInfoEntity() {
        return arbitrateInfoEntity;
    }

    public void setArbitrateInfoEntity(ArbitrateInfoEntity arbitrateInfoEntity) {
        this.arbitrateInfoEntity = arbitrateInfoEntity;
    }
}
